package com.wn.api.fallback;

import com.wn.api.UserApi;
import com.wn.bean.User;
import org.springframework.stereotype.Component;

/**
 * @author yellow Docter
 * @date 2023 -08-09
 * @desc
 */
@Component
public class UserApiFallBack implements UserApi {
    @Override
    public User findUserById(Integer id) {

        User user = new User();
        user.setName("调用失败..." + id);
        user.setAge(30);
        user.setDesc("描述失败的错误");

        return user;
    }
}
